package com.example.mybatisplus.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.mybatisplus.mapper.AskConsultMapper;
import com.example.mybatisplus.model.domain.AskConsult;
import com.example.mybatisplus.service.AskConsultService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author lxp
 * @since 2022-05-31
 */
@Service
public class AskConsultServiceImpl extends ServiceImpl<AskConsultMapper, AskConsult> implements AskConsultService {
    @Autowired
    private AskConsultMapper askConsultMapper;
    @Override
    public List<AskConsult> getAll() {
        List<AskConsult> askConsultList = askConsultMapper.getAll();
        return askConsultList;
    }

    @Override
    public void deleteChange(Long stuId) {
        askConsultMapper.deleteChange(stuId);
    }

    @Override
    public void add(AskConsult askConsult) {
        askConsultMapper.add(askConsult.getStuId(),askConsult.getTimeId(),askConsult.getAskReason(),askConsult.getAdutStatus());
    }
//    @Autowired
//    private AskConsultMapper askConsultMapper;
//
//    @Override
//    public void addAskConsult(AskConsult askConsult) {
//        askConsultMapper.addAskConsult(askConsult);
//    }
}
